// inotify 文件监控服务
#ifndef __CONN_MONITOR_H_INCLUDED__
#define __CONN_MONITOR_H_INCLUDED__

#ifdef __cplusplus
extern "C" {
#endif

class conn_monitor{

public:
    conn_monitor();
    ~conn_monitor();

    static conn_monitor* get_instance();
    static void destroy();

    int init();
    int add_watch(const char* file_name);
    int remove_watch(const char* file_name);

    void run();

private:

    static conn_monitor* instance;

    int in_fd;
};

#ifdef __cplusplus
}
#endif

#endif // __CONN_MONITOR_H_INCLUDED__